﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using Computer_Manager.DTO;
using Computer_Manager.BUS;

namespace Computer_Manager.GUI
{
    public partial class frmOrder : DevExpress.XtraEditors.XtraForm
    {
        public frmOrder()
        {
            InitializeComponent();
        }
        BUS_order bus_order = new BUS_order();

        private void frmOrder_Load(object sender, EventArgs e)
        {
            grcOrder.DataSource = bus_order.GetAll();
        }

        private void btnOrderdetail_Click(object sender, EventArgs e)
        {
            frmViewOrder frmViewOrder = new frmViewOrder();
            int id_order = int.Parse(grvOrder.GetFocusedDataRow()["id_order"].ToString());
            frmViewOrder.id_order = id_order;

            frmViewOrder.ShowDialog();
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}